import { Button } from "antd";
import { useNavigate } from "react-router-dom";

export const APage = () => {
  const navigate = useNavigate();

  const linkB = () => {
    navigate('/b?name=张三');
  };

  return (
    <div>
      <div>A页面</div>
      <Button onClick={linkB}>跳转B页面并携带name张三</Button>
    </div>
  );
};
